import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: () => import("../components/login/login.vue"),

  },
  {
    path: '/index',
    name: 'Index',
    component: () => import("../components/index/index.vue"),
  //   meta: {requiresAuth: true, title: "主页"
  // }
  },
  {
    path: "/about",
    name: "About",
    component: () => import("../views/About.vue"),
    meta: {
      requiresAuth: true,
      title: "首页"
    },
    children: [{
        path: "reimbursement",
        name: "Reimbursement",
        component: () => import("../components/reimbursement/reimbursement.vue"),
        meta: {
          requiresAuth: true,
          title: "费用报销"
        }
      },
      {
        path: "expenses",
        name: "Expenses",
        component: () => import("../components/expenses/expenses.vue"),
        meta: {
          requiresAuth: true,
          title: "费用申请"
        }
      },
      {
        path: "payment",
        name: "Payment",
        component: () => import("../components/payment/payment.vue"),
        meta: {
          requiresAuth: true,
          title: "付款申请"
        }
      },
      {
        path: "reserve",
        name: "Reserve",
        component: () => import("../components/reserve/reserve.vue"),
        meta: {
          requiresAuth: true,
          title: "备用金申请"
        }
      },
      {
        path: "educaiwu",
        name: "Educaiwu",
        component: () => import("../components/educaiwu/educaiwu.vue"),
        meta: {
          requiresAuth: true,
          title: "行政财务"
        }
      },
      {
        path: "education",
        name: "Education",
        component: () => import("../components/education/education.vue"),
        meta: {
          requiresAuth: true,
          title: "总务处"
        }
      },
      {
        path: "edudangan",
        name: "Edudangan",
        component: () => import("../components/edudangan/edudangan.vue"),
        meta: {
          requiresAuth: true,
          title: "档案处"
        }
      },
      {
        path: "eduhouqingchu",
        name: "Eduhouqingchu",
        component: () => import("../components/eduhouqingchu/eduhouqingchu.vue"),
        meta: {
          requiresAuth: true,
          title: "后勤处"
        }
      },
      {
        path: "eduxueshenghui",
        name: "Eduxueshenghui",
        component: () => import("../components/eduxueshenghui/eduxueshenghui.vue"),
        meta: {
          requiresAuth: true,
          title: "学生处"
        }
      },
      {
        path: "eduzhengjiao",
        name: "Eduzhengjiao",
        component: () => import("../components/eduzhengjiao/eduzhengjiao.vue"),
        meta: {
          requiresAuth: true,
          title: "学生处"
        }
      },
      {
        path: "studentManagement",
        name: "StudentManagement",
        component: () => import("../components/studentManagement/studentManagement.vue"),
        meta: {
          requiresAuth: true,
          title: "学生管理"
        }
      },
      {
        path: "staffManagement",
        name: "staffManagement",
        component: () => import("../components/staffManagement/staffManagement.vue"),
        meta: {
          requiresAuth: true,
          title: "学生管理"
        }
      },
      {
        path: "userManage",
        name: "UserManage",
        component: () => import("../components/userManage/userManage.vue"),
        meta: {
          requiresAuth: true,
          title: "学生管理"
        }
      },
      {
        path: "roleManage",
        name: "roleManage",
        component: () => import("../components/roleManage/roleManage.vue"),
        meta: {
          requiresAuth: true,
          title: "角色管理"
        }
      },
      {
        path: "addUser",
        name: "adduser",
        component: () => import("../components/adduser/adduser.vue"),
        meta: {
          requiresAuth: true,
          title: "角色管理"
        },
      },
      {
        path: "test",
        name: "Test",
        component: () => import("../components/test/test.vue"),
        meta: {
          requiresAuth: true,
          title: "test"
        }
      },
      {
        path: "page1",
        name: "Page1",
        component: () => import("../components/page1/page1.vue"),
        meta: {
          requiresAuth: true,
          title: "加班"
        }
      },
      {
        path: "page2",
        name: "Page2",
        component: () => import("../components/page2/page2.vue"),
        meta: {
          requiresAuth: true,
          title: "加班"
        }
      },
      {
        path: "page3",
        name: "Page3",
        component: () => import("../components/page3/page3.vue"),
        meta: {
          requiresAuth: true,
          title: "加班"
        }
      },
      {
        path: "firstPage",
        name: "FirstPage",
        component: () => import("../components/firstPage/firstPage.vue"),
        meta: {
          requiresAuth: true,
          title: "加班"
        }
      },
      {
        path: "MonthlyReport",
        name: "MonthlyReport",
        component: () => import("../components/MonthlyReport/MonthlyReport.vue"),
        meta: {
          requiresAuth: true,
          title: "月报"
        }
      },
      {
        path: "Daily",
        name: "Daily",
        component: () => import("../components/Daily/Daily.vue"),
        meta: {
          requiresAuth: true,
          title: "日报"
        }
      },
      {
        path: "Weekly",
        name: "Weekly",
        component: () => import("../components/Weekly/Weekly.vue"),
        meta: {
          requiresAuth: true,
          title: "日报"
        }
      },
      {
        path: "approve",
        name: "Approve",
        component: () => import("../components/approve/approve.vue"),
        meta: {
          requiresAuth: true,
          title: "日报"
        }
      },
      {
        path: "meets",
        name: "Meets",
        component: () => import("../components/meets/meets.vue"),
        meta: {
          requiresAuth: true,
          title: "日报"
        }
      },
      {
        path: "office",
        name: "office",
        component: () => import("../components/office/office.vue"),
        meta: {
          requiresAuth: true,
          title: "日报"
        },
      },
      {
        path: "myScore",
        name: "MyScore",
        component: () => import("../components/myScore/myScore.vue"),
        meta: {
          requiresAuth: true,
          title: "日报"
        },
      },
      {
        path: "cars",
        name: "Cars",
        component: () => import("../components/cars/cars.vue"),
        meta: {
          requiresAuth: true,
          title: "用车申请"
        },
      },
      {
        path: "seal",
        name: "Seal",
        component: () => import("../components/seal/seal.vue"),
        meta: {
          requiresAuth: true,
          title: "印章申请"
        },
      },
      {
        path: "shop",
        name: "Shop",
        component: () => import("../components/shop/shop.vue"),
        meta: {
          requiresAuth: true,
          title: "采购"
        },
      },
      {
        path: "things",
        name: "Things",
        component: () => import("../components/things/things.vue"),
        meta: {
          requiresAuth: true,
          title: "物品领用"
        },
      },
      {
        path: "logistics",
        name: "Logistics",
        component: () => import("../components/logistics/maintain.vue"),
        meta: {
          requiresAuth: true,
          title: "物品领用"
        },
      },
    ]
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router